<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/beiyong.css"/>
		<style type="text/css">
			.mui-table-view-cell>a:not(.mui-btn){
				margin: 0;
			}
			body{
				background-color: #E7EFFE;
			}
			.headimg{
				width: 100%;
				height: auto;
				background-color: #7DB1FD;
				padding-bottom: 1em;
				margin: 0;
			}
			.h{
				width: 100%;
				height: 44px;
				line-height: 44px;
				text-align: center;
				color: white;
			}
			.head{
				width: 100%;
				height: auto;
				padding: 15px 15px;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
			}
			.left{
				width: 70px;
				height: 70px;
			}
			.left img{
				width: 100%;
				height: 100%;
				border-radius: 50%;
			}
			.right{
				padding: 0 20px;
				text-align: center;
				
			}
			.right div{
				padding: 5px;
			}
			.pl10{
				padding-left: 10px;
			}
			span{
				font-size: 1em;
				font-weight: 550;
			}
			.bom{
				color: white;
			}
			.mui-table-view {
			    position: relative;
			    margin-top: 0;
			    margin-bottom: 0;
			    padding-left: 0;
			    list-style: none;
			    background-color: #fff;
			    
			    margin: .8em;
			    z-index: 9;
			    margin-top: -1em;
			    border-radius: 0.2em;
			    box-shadow:5px 5px 10px #CDE0FF;
			}
			.mui-table-view:before {
			    position: absolute;
			    right: 0;
			    left: 0;
			    height: 0px;
			    content: '';
			    -webkit-transform: scaleY(.5);
			    transform: scaleY(.5);
			    background-color: #c8c7cc;
			    top: 0px;
			}
			.mui-table-view:after {
			    position: absolute;
			    right: 0;
			    left: 0;
			    height: 0px;
			    content: '';
			    -webkit-transform: scaleY(.5);
			    transform: scaleY(.5);
			    background-color: #c8c7cc;
			    top: 0px;
			}
			.mui-table-view-cell {
			    position: relative;
			    overflow: hidden;
			    padding: 0.4em 1em;
			    -webkit-touch-callout: none;
			    color: #666666;
			    display: flex;
				justify-content: flex-start;
				align-items: center;
				height: 3.5em;
			}
			.mui-table-view-cell:after{ right:15px;}
			.jg{
				height: 1em;
				width: 100%;
			}
			.mui-table-view .mui-media-object{
				width: 1.2em;
				height: 1.2em;
				line-height: 1.2em;
			}
			
			.mui-navigate-right{
				margin-right: 10px;
			}
			.setimg{
				width: 1.2em;
				height: 1.2em;
			}
			.nc{
				color: white;
			}
			.top,.block{
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		</style>
	</head>

	<body>
		<div class="mui-content cbg">
			<div class="main">
			<div class="headimg">
				<div class="h">个人中心</div>
				<div class="head">
					<div class="left">
						<img src="../images/user-photo.png" id="himg"/>
					</div>
					<div class="right">
						<div class="top">
							<div id="nc">
								
							</div>
							<!--
                            	作者：592176224@qq.com
                            	时间：2019-01-18
                            	描述：
							<div class="pl10 block" onclick="gopage('setname')">
							</div>
                            -->
							<img class="setimg" onclick="gopage('setname')" src="../images/edit1.png"/>
						</div>
						<div class="bom" id="zh">
						</div>
					</div>
				</div>	
			</div>
		<ul class="mui-table-view">
		        <li class="mui-table-view-cell mui-media" onclick="gopage('mywallet')">
		        	<img class="mui-media-object mui-pull-left" src="../images/qb.png">
		            <div class="mui-navigate-right">
		            	我的钱包
		            </div>
		        </li>
		        <li class="mui-table-view-cell" onclick="gopage('myorder')">
		        	<img class="mui-media-object mui-pull-left" src="../images/dd.png">
		            <div class="mui-navigate-right">
		                 我的订单
		            </div>
		        </li>
		 </ul>        
		 <div class="jg"></div>
		 <ul class="mui-table-view ">
		        <li class="mui-table-view-cell" onclick="gopage('collection')">
		        	<img class="mui-media-object mui-pull-left" src="../images/sc.png">
		            <div class="mui-navigate-right">
		                 我的收藏
		            </div>
		        </li>
		       <!--
               	作者：592176224@qq.com
               	时间：2019-01-18
               	描述：
              
		       <li class="mui-table-view-cell" onclick="gopage('focus')">
		        	<img class="mui-media-object mui-pull-left" src="../images/gz.png">
		            <div class="mui-navigate-right">
		                 我的关注
		            </div>
		        </li>
		         -->
		        <li class="mui-table-view-cell">
		        	<img class="mui-media-object mui-pull-left" src="../images/fb.png">
		            <div class="mui-navigate-right">
		                 我的发布
		            </div>
		        </li>
		        <li class="mui-table-view-cell" onclick="gopage('audit_information')">
		        	<img class="mui-media-object mui-pull-left" src="../images/sc.png">
		            <div class="mui-navigate-right">
		                 我的审核
		            </div>
		        </li>
		        <li class="mui-table-view-cell" onclick="gopage('address')">
		        	<img class="mui-media-object mui-pull-left" src="../images/dz.png">
		            <div class="mui-navigate-right">
		                 地址管理
		            </div>
		        </li>
		        <li class="mui-table-view-cell" onclick="gopage('problem')">
		        	<img class="mui-media-object mui-pull-left" src="../images/tx.png">
		            <div class="mui-navigate-right">
		                 问题反馈
		            </a>
		        </li>
		        
		        <li class="mui-table-view-cell" onclick="gologing()">
		        	<img class="mui-media-object mui-pull-left" src="../images/tx.png">
		            <div class="mui-navigate-right">
		                 退出登录
		            </a>
		        </li>
		    </ul>
		 </div>
		</div>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mui.min.js"></script>
		<script src="../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
			
				getname();
		
			})
			function gologing(){
            plus.nativeUI.actionSheet({
                cancel: "取消",
                buttons: [{
                    title: "注销当前账号"
                }, {
                    title: "直接关闭应用"
                }]
            }, function(e) {
                var index = e.index;
                switch (index) { //case 0: 取消
                    case 1: //
                        localStorage.clear();
                        localStorage.removeItem("accesstoken");
                        plus.runtime.restart();
                        mui.currentWebview.close();
                        break;
                    case 2: //
                        plus.runtime.quit();
                        break;
                }
            });
				
			}
			
			function gopage(page){
				mui.openWindow({
				    url: page + '.html', 
				    id: page
				 });
			}
			
			function getname(){
				let data = {
					url:"/api/Personal/member_info",
					data:{access_token : acctoken()||""}
				}
				ajax(data,function(res){
					console.log(res);
					if(res.code == -1){
						mui.toast(res.message);
					}
					if(res.code == 1){
						let nc = document.getElementById("nc");
						let zh = document.getElementById("zh");
						let himg = document.getElementById("himg");
						nc.innerHTML = res.data[0].nickname;
						zh.innerHTML = res.data[0].account;
						if(res.data[0].headimage){
							himg.src = res.data[0].headimage;
						}
					}
				})
				
			}
		</script>
	</body>

</html>